home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act8 / 00365.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  3.0 KB  |  54 lines

  1. on defbuggy
  2.   global ogre, caranim, mouthindex, temp, phrases
  3.   set phrases to [:]
  4.   set phrases to ["wrong1": "oewrimbrs  lokaesin", "wrong2": "soorrrywwtookdarrongpatt", "wrong3": "thisisthecorrectpath", "narr1": "hiiii  helpmefindmywaytothebox", "narr2": "thesignshowsthepath  thatwillleadthere", "narr3": "   hiiliithhatpatt  andiwilldriivtothebox          clickonthenumbers", "narr4": "tomoveahead      clickonthemagaintomovbak", "narr5": "lookatthesintocheckthepath", "correct1.1": "thanksforyourhelp", "correct1.2": "yoursmart", "correct1.4": "youdidfineyoufollowedthesign", "correct1.5": "yaaaaaayoufollowedthepath  yourgoodatmath", "bs5": "youdidfine ******* youfollowedthesigns", "bs6": "youdidfine ******* youfollowedthesigns", "bs1": "   ###          iilovvgoinbugggyyy", "bs2": "      ##    #     trsnoooopplasslikkhommmm     ", "bs3": "   ##    #        taatwasafunnnridd    ", "bs4": "     ##      ####         #    hey#yourreallygoodatthis  thanksfortehelp ", "bs7": "  yoooososmart", "again": "      herweegoagain.", "#1": "onn", "#2": "to", "#3": "tree", "#4": "for", "#5": "fiv", "#6": "six", "#7": "seven", "#8": "ate", "#9": "niin", "#10": "tan"]
  5.   set mouthindex to ["#": "#", "*": "*", " ": "-", "a": "a", "b": "-", "c": "c", "d": "d", "e": "e", "f": "f", "g": "g", "h": "k", "i": "i", "j": "g", "k": "k", "l": "l", "m": "-", "n": "d", "o": "o", "p": "-", "q": "k", "r": "r", "s": "t", "t": "t", "u": "o", "v": "f", "w": "k", "x": "t", "y": "e", "z": "t"]
  6.   set temp to [:]
  7.   set yyy to 1
  8.   repeat with xxx = 1 to count(mouthindex)
  9.     set dingus to the number of cast (yyy & getAt(mouthindex, xxx))
  10.     addProp(temp, getPropAt(mouthindex, xxx), dingus)
  11.   end repeat
  12.   set caranim to [#body: [#rest: [1, "bod1"], #right: [4, "bod21"], #left: [4, "bod31"], #back: [4, "bod41"]], #lips: temp]
  13.   set saytext to "Youdidfine ******* youfollowedthesigns"
  14.   addProp(caranim, #text, saytext)
  15.   addProp(caranim, #sound, "bs6")
  16.   addProp(caranim, #tempo, 5)
  17.   set ogre to birth(script "buggyhead", 25, 26, caranim)
  18.   put the puppet of sprite 26
  19. end
  20.  
  21. on setscript soundname
  22.   global ogre, phrases
  23.   set the bugsound of ogre to soundname
  24.   set the bugtext of ogre to getaProp(phrases, soundname)
  25. end
  26.  
  27. on sactivate snew, stuff
  28.   puppetSprite(snew, 1)
  29.   if listp(stuff) then
  30.     set the castNum of sprite snew to getAt(stuff, 1)
  31.     set the locH of sprite snew to getAt(stuff, 2)
  32.     set the locV of sprite snew to getAt(stuff, 3)
  33.     set the ink of sprite snew to getAt(stuff, 4)
  34.     set the type of sprite snew to getAt(stuff, 5)
  35.     set the stretch of sprite snew to getAt(stuff, 6)
  36.     set the foreColor of sprite snew to getAt(stuff, 7)
  37.     set the backColor of sprite snew to getAt(stuff, 8)
  38.   end if
  39. end
  40.  
  41. on sinfo sold
  42.   set stemp to []
  43.   add(stemp, the castNum of sprite sold)
  44.   add(stemp, the locH of sprite sold)
  45.   add(stemp, the locV of sprite sold)
  46.   add(stemp, the ink of sprite sold)
  47.   add(stemp, the type of sprite sold)
  48.   add(stemp, the stretch of sprite sold)
  49.   add(stemp, the foreColor of sprite sold)
  50.   add(stemp, the backColor of sprite sold)
  51.   return stemp
  52.   put stemp
  53. end
  54.